package ua.com.globallogic.training.subway;

import java.util.Date;

public class AccumulativeCardState extends CardState {
    private Double balance;

    public AccumulativeCardState(int id, Double balance) {
        super(id);
        this.balance = balance;
    }

    public void addMoney(double amountOfMoney) {
        balance = balance + amountOfMoney;
    }

    public double getBalance() {
        return balance;
    }

    @Override
    public void chargeOneTrip() {
        balance = balance - Registry.FARE;
    }
}
